In computing, a hidden directory or hidden file on a computer is a directory (folder) or file which a user cannot see by default. Hidden directories most often serve to hide important operating system-related files and user preferences. However, malicious programs can also use this functionality to hide their presence from unaware users.
Contents |
In Unix-like operating systems there is a convention that a file or directories with a filename that starts with a period/full stop character (for example: /home/user/.config) is to be treated as hidden. How to show or hide them either depends on the file manager in use (e.g. mc shows them by default, Ctrl-h (h stands for hidden) is the keyboard shortcut to show in Nautilus) or ls with the flag -a
can reveal otherwise invisible resources: (ls -a
).
Additionally, wildcards on the shell command line will not match dotfiles unless they start with an explicit '.' .
A common use these dotfiles is for personal configuration settings.[1][2][3]
In addition to the "dotfile" behaviour, files with the "Invisible" attribute are hidden in Finder in Mac OS X. This is set using the SetFile
command. For example, invoking SetFile -a V jimbo
will hide the file "jimbo". Alternate way is to use chflags command. chflags nohidden ~/Library/
clears hidden attribute on user's Library folder on Mac OS X 10.7 while SetFile fails with an error.
In addition to hiding "dotfiles", the Nautilus file manager also looks for a text file named .hidden in each directory and hides all files listed inside.
In MS-DOS and other DOS systems, users can make files and folders hidden or visible by toggling their Hidden File attribute using attrib command. Invoking dir /a
may reveal the existence of unsuspected hidden objects.
In Microsoft Windows, hiding resembles that of DOS — users can hide or unhide items by toggling the "Hidden" attribute, using attrib or Windows Explorer.